package com.ruoyi.huoyun.message.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.huoyun.message.mapper.ToDriverEvaluateMapper;
import com.ruoyi.huoyun.message.domain.ToDriverEvaluate;
import com.ruoyi.huoyun.message.service.IToDriverEvaluateService;

/**
 * 对司机的评价Service业务层处理
 *
 * @author mj
 * @date 2021-11-29
 */
@Service
public class ToDriverEvaluateServiceImpl implements IToDriverEvaluateService
{
    @Autowired
    private ToDriverEvaluateMapper toDriverEvaluateMapper;

    /**
     * 查询对司机的评价
     *
     * @param id 对司机的评价主键
     * @return 对司机的评价
     */
    @Override
    public ToDriverEvaluate selectToDriverEvaluateById(Integer id)
    {
        return toDriverEvaluateMapper.selectToDriverEvaluateById(id);
    }

    /**
     * 查询对司机的评价列表
     *
     * @param toDriverEvaluate 对司机的评价
     * @return 对司机的评价
     */
    @Override
    public List<ToDriverEvaluate> selectToDriverEvaluateList(ToDriverEvaluate toDriverEvaluate)
    {
        return toDriverEvaluateMapper.selectToDriverEvaluateList(toDriverEvaluate);
    }

    /**
     * 新增对司机的评价
     *
     * @param toDriverEvaluate 对司机的评价
     * @return 结果
     */
    @Override
    public int insertToDriverEvaluate(ToDriverEvaluate toDriverEvaluate)
    {
        return toDriverEvaluateMapper.insertToDriverEvaluate(toDriverEvaluate);
    }

    /**
     * 修改对司机的评价
     *
     * @param toDriverEvaluate 对司机的评价
     * @return 结果
     */
    @Override
    public int updateToDriverEvaluate(ToDriverEvaluate toDriverEvaluate)
    {
        return toDriverEvaluateMapper.updateToDriverEvaluate(toDriverEvaluate);
    }

    /**
     * 批量删除对司机的评价
     *
     * @param ids 需要删除的对司机的评价主键
     * @return 结果
     */
    @Override
    public int deleteToDriverEvaluateByIds(Integer[] ids)
    {
        return toDriverEvaluateMapper.deleteToDriverEvaluateByIds(ids);
    }

    /**
     * 删除对司机的评价信息
     *
     * @param id 对司机的评价主键
     * @return 结果
     */
    @Override
    public int deleteToDriverEvaluateById(Integer id)
    {
        return toDriverEvaluateMapper.deleteToDriverEvaluateById(id);
    }
}
